var mapIds = [867139000];
var 准备地图 = 867139000;

function init() {}

function setup(c, a) {
    em.setProperty("state", 1);
    em.setProperty("leader", "true");
    var c = em.newInstance("日冕活动_庆典现场");
    for (var b = 0; b < mapIds.length; b++) {
        var d = c.setInstanceMap(mapIds[b])
    }
    c.schedule("循环A", 0);
    return c
}

function 循环A(a) {
    var b = a.getMapInstance(0);
    b.乌鲁斯_动态移动物体(-798, -136, -798, -836, -798, -136, 1, 0, -30, "expB");
    b.乌鲁斯_动态移动物体(-650, -450, -650, -1150, -650, -450, 1, 0, -30, "expBalloon");
    b.乌鲁斯_动态移动物体(457, -816, 457, -116, 457, -816, 1, 0, 30, "pointB");
    b.乌鲁斯_动态移动物体(450, -1150, 450, -450, 450, -1150, 1, 0, 30, "pointBalloon");
    a.getPlayers().forEach(function (c) {
        if (c.getPosition().x < -680 && c.getPosition().x > -900 && c.getPosition().y < -150 && c.getPosition().y > -860) {
            c.getAPI().effect_GainExpGold(10000);
            c.gainExp(10000, true, true, false)
        }
    });
    a.schedule("循环B", 25 * 1000)
}

function 循环B(a) {
    var b = a.getMapInstance(0);
    b.乌鲁斯_动态移动物体(-798, -836, -798, -136, -798, -836, 1, 0, 30, "expB");
    b.乌鲁斯_动态移动物体(-650, -1150, -650, -450, -650, -1150, 1, 0, 30, "expBalloon");
    b.乌鲁斯_动态移动物体(457, -116, 457, -816, 457, -116, 1, 0, -30, "pointB");
    b.乌鲁斯_动态移动物体(450, -450, 450, -1150, 450, -450, 1, 0, -30, "pointBalloon");
    a.getPlayers().forEach(function (c) {
        if (c.getPosition().x < -680 && c.getPosition().x > -900 && c.getPosition().y < -150 && c.getPosition().y > -860) {
            c.getAPI().effect_GainExpGold(10000);
            c.gainExp(10000, true, true, false);
            c.getAPI().addNumberForQuestInfo(500828, "point", 1);
            c.getAPI().addNumberForQuestInfo(500828, "sum", 100)
        }
    });
    a.schedule("循环A", 25 * 1000)
}

function onPlayerRegistered(b, a) {
    a.setReviveCount(-100)
}

function onPlayerRevived(b, a) {
    return false
}

function onMapChanged(c, b, a) {
    if (mapIds.indexOf(a) < 0) {
        on玩家退场(c, b, false);
        return
    }
}

function onPlayerDisconnected(b, a) {
    on玩家退场(b, a, false);
    return 0
}

function onMonsterDamaged(b, a, d, e, c) {}

function onTimeOut(a) {
    a.getPlayers().forEach(function (b) {
        on玩家退场(a, b, true)
    })
}

function onMonsterKilled(a, c, b) {}

function onPartyDisbanded(a) {}

function onPlayerKilled(b, a) {}
var setupTask;

function initProp(a, b) {
    if (em.getProperty(a) == null) {
        em.setProperty(a, b)
    }
}

function initPropArray(a, d, c, e) {
    for (var b = c; b <= e; b++) {
        if (em.getProperty(a + "_" + b) == null) {
            em.setProperty(a + "_" + b, d)
        }
    }
}

function on玩家退场(c, b, a) {
    c.disposeIfPlayerBelow(a ? 999 : 0, 准备地图);
    em.getProperties().clear();
    em.setProperty("state", 0);
    em.setProperty("leader", "true");
    c.unregisterPlayer(b)
}

function onItemPickedUp(b, a, c) {};